using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_ChiTietPhieuNhapManagerBase
    {
        public TBL_ChiTietPhieuNhapManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity Insert(TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity Update(TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity UpdateWithCondition(TBL_ChiTietPhieuNhapEntity obj,TBL_ChiTietPhieuNhapEntity objCond)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_ChiTietPhieuNhapEntity Delete(TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_ChiTietPhieuNhapEntity DeleteWithCondition(TBL_ChiTietPhieuNhapEntity objCond)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByGhiChu (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu 
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByGhiChu (string GhiChu )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaCTPN (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaCTPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaCTPN 
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaCTPN (string MaCTPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaCTPN = MaCTPN;  
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaCTPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaPN (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaPN 
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaPN (string MaPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaPN = MaPN;  
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaPN");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaTB (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTB 
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteByMaTB (string MaTB )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaTB = MaTB;  
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"MaTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteBySoLuong (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"SoLuong");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien SoLuong 
        /// </summary>
        /// <returns>TBL_ChiTietPhieuNhapEntity</returns>
        public TBL_ChiTietPhieuNhapEntity DeleteBySoLuong (int SoLuong )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.SoLuong = SoLuong;  
            return (TBL_ChiTietPhieuNhapEntity)Adapter.DeleteByField(obj,"SoLuong");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_ChiTietPhieuNhapEntity Select(TBL_ChiTietPhieuNhapEntity obj)
        { 
            return (TBL_ChiTietPhieuNhapEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_ChiTietPhieuNhapEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_ChiTietPhieuNhapEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectAllLST()
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_ChiTietPhieuNhapEntity()),new TBL_ChiTietPhieuNhapEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_ChiTietPhieuNhapEntity(),option),new TBL_ChiTietPhieuNhapEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByGhiChuLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByGhiChuLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"GhiChu",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByGhiChuLST (string GhiChu )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByGhiChuLST (string GhiChu, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTPN (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaCTPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTPN (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaCTPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaCTPNLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTPN"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaCTPNLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaCTPN",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTPN (string MaCTPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaCTPN = MaCTPN;  
            return Adapter.SelectByField(obj,"MaCTPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTPN (string MaCTPN, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaCTPN = MaCTPN;  
            return Adapter.SelectByField(obj,"MaCTPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaCTPNLST (string MaCTPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaCTPN = MaCTPN;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTPN"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaCTPNLST (string MaCTPN, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaCTPN = MaCTPN;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTPN",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaPNLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaPNLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaPN",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (string MaPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaPN = MaPN;  
            return Adapter.SelectByField(obj,"MaPN");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaPN (string MaPN, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaPN = MaPN;  
            return Adapter.SelectByField(obj,"MaPN",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaPNLST (string MaPN )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaPN = MaPN;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaPN duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaPNLST (string MaPN, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaPN = MaPN;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaPN",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaTBLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaTBLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaTB",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (string MaTB )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaTB = MaTB;  
            return Adapter.SelectByField(obj,"MaTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (string MaTB, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaTB = MaTB;  
            return Adapter.SelectByField(obj,"MaTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaTBLST (string MaTB )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaTB = MaTB;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectByMaTBLST (string MaTB, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.MaTB = MaTB;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return Adapter.SelectByField(obj,"SoLuong");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"SoLuong",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectBySoLuongLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectBySoLuongLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"SoLuong",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (int SoLuong )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.SoLuong = SoLuong;  
            return Adapter.SelectByField(obj,"SoLuong");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (int SoLuong, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.SoLuong = SoLuong;  
            return Adapter.SelectByField(obj,"SoLuong",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectBySoLuongLST (int SoLuong )
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.SoLuong = SoLuong;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong"),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectBySoLuongLST (int SoLuong, SelectOptions option)
        { 
            TBL_ChiTietPhieuNhapEntity obj = new TBL_ChiTietPhieuNhapEntity();
            obj.SoLuong = SoLuong;  
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong",option),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectWithConditionLST (TBL_ChiTietPhieuNhapEntity obj)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_ChiTietPhieuNhapEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietPhieuNhapEntity></returns>
        public List<TBL_ChiTietPhieuNhapEntity> SelectWithConditionLST (TBL_ChiTietPhieuNhapEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietPhieuNhapEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_ChiTietPhieuNhapEntity());
        }

}
}
